import numpy as np
A=np.arange(12).reshape((3,4))
print(A)
print(np.split(A,2,axis=1))#左右分割成两列
print("--------------------------")
print(np.split(A,3,axis=0))#上下分割成三列
print("--------------------------")
print(np.array_split(A,2,axis=0))#这样可以进行不等分割
print("--------------------------")
print(np.vsplit(A,3))#上下分割
print("--------------------------")
print(np.hsplit(A,2))#左右分割
